package io.esriong.android.demo;

import android.os.Bundle;
import android.view.View;

import io.esirong.base.BaseMvpActivity;
import io.esriong.android.demo.mvp.MainContract;
import io.esriong.android.demo.mvp.MainPresenter;


public class MainActivity extends BaseMvpActivity<MainPresenter> implements MainContract.View {
    /*
    * 1.继承MVP View接口
    * 2.范型指定你的P
    * 3.实现约定的View接口
    */

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        showLoading();
        showDialog();
    }

    @Override
    protected void initView(View view) {
        super.initView(view);
    }

    @Override
    protected MainPresenter createPresenter() {
        return new MainPresenter();
    }

    @Override
    public void showNew() {
        presenter().signOk();
    }
}
